.content {
  background-color: #f9f9f9;
  padding: 20px;
  box-sizing: border-box;
  height: auto;
  min-height: 100%;
}

.product-details-container {
  max-width: 800px;
  margin: 10px auto 10px auto;
  background-color: #ffffff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  text-align: center;
}

.product-gallery {
  margin-bottom: 20px;
}

.main-image-wrapper {
  position: relative;
  width: 100%;/
  aspect-ratio: 16 / 10;
  border-radius: 8px;
  overflow: hidden;
  background-color: #f0f0f0;
}

#main-product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s ease-in-out;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.3);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 20px;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0; /* 默认隐藏 */
  transition: opacity 0.2s, background-color 0.2s;
}

.main-image-wrapper:hover .gallery-nav {
  opacity: 1; /* 悬停时显示按钮 */
}

.gallery-nav:hover {
  background-color: rgba(0, 0, 0, 0.6);
}

.gallery-nav.prev {
  left: 10px;
}

.gallery-nav.next {
  right: 10px;
}

.thumbnail-list {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}

.thumbnail-item {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border: 2px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s, border-color 0.2s;
}

.thumbnail-item:hover {
  opacity: 1;
}

.thumbnail-item.active {
  border-color: #FFD700;
  opacity: 1;
}


.product-details-container h1 {
  font-size: 2em;
  margin-bottom: 10px;
  color: #333;
}

.product-price {
  font-size: 1.5em;
  color: #e44d26;
  font-weight: bold;
  margin-bottom: 10px;
}

.product-stock {
  font-size: 1em;
  color: #888;
  margin-bottom: 20px;
}

.product-details-container p {
  font-size: 1em;
  line-height: 1.6;
  color: #555;
  text-align: left;
}

#recommendations-container {
  max-width: 800px;
  margin: 20px auto;
}

#recommendations-container h2 {
  margin-bottom: 15px;
  color: #333;
  text-align: center;
}

.recommendations-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.recommendations-list-wrapper {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 10px 0;
}

.recommendations-list-wrapper::-webkit-scrollbar {
  display: none;
}

.recommendations-list {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 20px;
}

.recommendation-item {
  flex: 0 0 150px;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  text-align: center;
  padding: 10px;
  transition: transform 0.2s ease-in-out;
}

.recommendation-item:hover {
  transform: translateY(-5px);
}

.recommendation-item img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 6px;
}

.recommendation-item p {
  margin-top: 8px;
  font-size: 0.9em;
  color: #444;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.scroll-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.8);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 20px;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: background-color 0.2s, box-shadow 0.2s;
}

.scroll-btn:hover {
  background-color: white;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.scroll-btn.prev {
  left: -20px;
}

.scroll-btn.next {
  right: -20px;
}

.product-actions-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 30px;
}

.buy-chat-group {
  display: flex;
  align-items: center;
  gap: 15px;
}

.action-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 1em;
  font-weight: bold;
  cursor: pointer;
  transition: opacity 0.2s, background-color 0.3s, color 0.3s;
}

.action-btn:hover {
  opacity: 0.85;
}

.action-btn:active {
  transform: scale(0.98);
}

.btn-buy,
.btn-chat {
  background-color: #FFD700;
  color: #333;
}

.btn-favorite {
  background-color: #cccccc;
  color: #333;
}

.btn-favorite.is-favorite {
  background-color: #e44d26;
  color: #ffffff;
}
